using System;
using NUnit.Framework;
using DotNetXmlSwfChart;

namespace DotNetXmlSwfChart.UnitTest
{
    [TestFixture]
    public class LegendRectangleFixture
    {
        [Test]
        public void ToSourceXml()
        {
            string testXml =
                "<legend_rect x='10' " +
                             "y='20' " +
                             "width='100' " + 
                             "height='200' " + 
                             "margin='2' " +
                             "fill_color='ffffff' " +
                             "fill_alpha='3' " +
                             "line_color='f0f0f0' " +
                             "line_alpha='4' " +
                             "line_thickness='5' " +
                             "/>";
            LegendRectangle lr = new LegendRectangle();
            lr.X = 10;
            lr.Y = 20;
            lr.Width = 100;
            lr.Height = 200;
            lr.Margin = 2;
            lr.FillColor = "ffffff";
            lr.FillAlpha = 3;
            lr.LineColor = "f0f0f0";
            lr.LineAlpha = 4;
            lr.LineThickness = 5;
            Assert.AreEqual(testXml, lr.ToSourceXML());
        }
    }
}
